import request from "@/utils/request";

/** 职位表单 */
export interface JobForm {
  jobName?: string;
  id?: number;
}
/** 职位对象 */
export interface JobVO {
  createdAt?: string;
  id: number;
  jobName: string;
  updateAt?: string;
}
class jobAPI {
  /** 获取职位列表 */
  static getJob() {
    return request<any, JobVO[]>({
      url: "/api/job_title",
      method: "get",
      // data: params,
    });
  }
  /** 新增+修改 职位列表 */
  static updateJob(params: JobForm) {
    return request<any, JobVO[]>({
      url: "/api/job_title",
      method: "post",
      data: params,
    });
  }
  /** 删除职位列表 */
  static deleteJob(id: string) {
    return request({
      url: `/api/job_title/${id}`,
      method: "delete",
      // data: params,
    });
  }
}

export default jobAPI;
